﻿using IBLL;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Model;

namespace ZY17.API.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class CookController : ControllerBase
    {
        public CookController(ICookBLL bll)
        {
            Bll = bll;
        }

        public ICookBLL Bll { get; }
        [HttpPost]
        public Task<int> AddCook(CookModel cook)
        {
            return Bll.AddCook(cook);
        }
        [HttpGet]
        public dynamic CookShow(string? name, int tid)
        {
            return Bll.CookShow(name, tid);
        }
    }
}
